# sparecap3.mod    
# by Yu Liu, 07/04/2001.
# Arc-flow model for spare capacity allocaiton

# for Model 3 on multilayer networks
# model sparecap.mod;

var sl {EDGES} default 0;
minimize s_l_cost: sum {(i1,i2) in EDGES} sl[i1,i2];

s.t. cap_aggrSl {(j1,j2) in EDGES, k in FAILS}:
  sl[j1,j2] >= sum{(i1,i2) in LINKS} H[i1,i2,j1,j2] * G[i1,i2,k];
# sl >= H^T G  or sl = max (H^T G)

problem find_spare3:
 s_cost, cap_aggrSl, spm_comp, fail_disj, mass_baS, backup_sym, Q, G, sl;


